using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using RTGS.Library.DataAccess.Rtgs;
using RTGS.Library.Entities.Rtgs;


namespace RTGS.Web.form.rtgs
	{
		public partial class stpReason_Form: BasePage
		{
			private string id = string.Empty;
            private stpReasonRepo stpReasonDal = new stpReasonRepo(ConfigurationManager.ConnectionStrings["Rtgs"].ConnectionString);


			protected void Page_Load(object sender, EventArgs e)
			{
				if (Request.Params["Id"] != null)
				{
					id = Convert.ToString(Request.Params["Id"]);
				}


			if (!Page.IsPostBack)
			{
				if (id != string.Empty) // Edit an existing item
					{
						stpReason obj = stpReasonDal.GetById(id);
						if (obj != null)
						{
                             hfID.Value = id.ToString().Trim();
                             txtreasonid.Text = obj.reasonid.ToString().Trim();
                             txtreasondesc.Text = obj.reasondesc.ToString().Trim();

						}
					}
				}
			}
		}
	}
